<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
</head>
<body>
<p>直接使用文本：<span th:text="'Hello World'"></span></p>
<p>加号连接文本：<span th:text="'Hello World'+ 'I am SB'"></span></p>
<p>使用Model中的文本：<span th:text="'Hello World'+ 'I am SB'+ 'My name is '+${name}"></span></p>
<p>使用竖线包含文本，字符串和表示式连接时可省略加号逗号：<span th:text="|Hello World My name is ${name}|"></span></p>
<p>布尔文本：<span th:text="|${name},${name2}|"></span></p>
<p>数字文本：<span th:text="123456 + 1"></span></p>
<p>布尔文本：<span th:text="true"></span></p>

<p>数字相加：<span th:text="${n1}+${n2}"></span></p>
<p><span th:if="${nullKey} == null ">nullKey为null才显示</span></p>
<p><span th:if="${bb} == false ">bb为false才显示</span></p>

<h1>逻辑表达式</h1>
<p th:if="20 > 10 ">20 > 10 </p>
<p th:if="20 &gt; 10 ">20 &gt;  10 </p>
<p th:if="20 &gt; 10  and 5 != 6">and </p>
<p th:if="!false">!false </p>



<h1>三元运算符</h1>
<p th:text="20 > 10 ?'20 > 10为真':'20 > 10为假'">20 > 10 </p>



<h1>设置属性值</h1>
<form action="subscribe.html" th:action="@{/index}">
    <fieldset>
        <input type="text" name="email" />
        <input type="submit" value="Subscribe!" th:value="#{name}"/>
    </fieldset>
</form>
<img src="../../images/gtvglogo.png"
     th:attr="src=@{./images/123.png},title='测试图片',alt='测试图片'" />
<img src="../../images/gtvglogo.png"
     th:attr="src=@{./images/123.png}" th:alt-title="测试图片"/>
<img src="../../images/gtvglogo.png"
     th:attr="src=@{./images/123.png}" th:alt-title="测试图片" th:test="测试默认处理器"/>


</table>

<h1>设置属性值</h1>

<tr/>
</body>
</html>